package cn.analysys.model;

import java.io.Serializable;
import java.util.Date;

public class CategoryDict implements Serializable {
    private Integer cateId;

    private String cateName;

    private String cateDesc;

    private Short orderNum;

    private Integer parentCateId;

    private Integer rootCategoryId;

    private Byte isdisplay;

    private Byte status;

    private Date createdDate;

    private static final long serialVersionUID = 1L;

    public Integer getCateId() {
        return cateId;
    }

    public void setCateId(Integer cateId) {
        this.cateId = cateId;
    }

    public String getCateName() {
        return cateName;
    }

    public void setCateName(String cateName) {
        this.cateName = cateName == null ? null : cateName.trim();
    }

    public String getCateDesc() {
        return cateDesc;
    }

    public void setCateDesc(String cateDesc) {
        this.cateDesc = cateDesc == null ? null : cateDesc.trim();
    }

    public Short getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Short orderNum) {
        this.orderNum = orderNum;
    }

    public Integer getParentCateId() {
        return parentCateId;
    }

    public void setParentCateId(Integer parentCateId) {
        this.parentCateId = parentCateId;
    }

    public Integer getRootCategoryId() {
        return rootCategoryId;
    }

    public void setRootCategoryId(Integer rootCategoryId) {
        this.rootCategoryId = rootCategoryId;
    }

    public Byte getIsdisplay() {
        return isdisplay;
    }

    public void setIsdisplay(Byte isdisplay) {
        this.isdisplay = isdisplay;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cateId=").append(cateId);
        sb.append(", cateName=").append(cateName);
        sb.append(", cateDesc=").append(cateDesc);
        sb.append(", orderNum=").append(orderNum);
        sb.append(", parentCateId=").append(parentCateId);
        sb.append(", rootCategoryId=").append(rootCategoryId);
        sb.append(", isdisplay=").append(isdisplay);
        sb.append(", status=").append(status);
        sb.append(", createdDate=").append(createdDate);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CategoryDict other = (CategoryDict) that;
        return (this.getCateId() == null ? other.getCateId() == null : this.getCateId().equals(other.getCateId()))
            && (this.getCateName() == null ? other.getCateName() == null : this.getCateName().equals(other.getCateName()))
            && (this.getCateDesc() == null ? other.getCateDesc() == null : this.getCateDesc().equals(other.getCateDesc()))
            && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum()))
            && (this.getParentCateId() == null ? other.getParentCateId() == null : this.getParentCateId().equals(other.getParentCateId()))
            && (this.getRootCategoryId() == null ? other.getRootCategoryId() == null : this.getRootCategoryId().equals(other.getRootCategoryId()))
            && (this.getIsdisplay() == null ? other.getIsdisplay() == null : this.getIsdisplay().equals(other.getIsdisplay()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreatedDate() == null ? other.getCreatedDate() == null : this.getCreatedDate().equals(other.getCreatedDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCateId() == null) ? 0 : getCateId().hashCode());
        result = prime * result + ((getCateName() == null) ? 0 : getCateName().hashCode());
        result = prime * result + ((getCateDesc() == null) ? 0 : getCateDesc().hashCode());
        result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode());
        result = prime * result + ((getParentCateId() == null) ? 0 : getParentCateId().hashCode());
        result = prime * result + ((getRootCategoryId() == null) ? 0 : getRootCategoryId().hashCode());
        result = prime * result + ((getIsdisplay() == null) ? 0 : getIsdisplay().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode());
        return result;
    }
}